home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Misc / emu / p-interp.lha / p-interp-0.5 / psystem.h < prev    next >
C/C++ Source or Header  |  2004-02-01  |  4KB  |  131 lines

  1. /*
  2.  
  3.   P-Code interpreter (to run the apple pascal system)
  4.   Copyright (C) 2000 Mario Klebsch
  5.  
  6.   This program is free software; you can redistribute it and/or modify
  7.   it under the terms of the GNU General Public License as published by
  8.   the Free Software Foundation; either version 2 of the License, or
  9.   (at your option) any later version.
  10.  
  11.   This program is distributed in the hope that it will be useful,
  12.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.   GNU General Public License for more details.
  15.  
  16.   You should have received a copy of the GNU General Public License
  17.   along with this program; if not, write to the Free Software
  18.   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  19.  
  20.  
  21.   $Log: psystem.h,v $
  22.   Revision 1.3  2001/05/20 20:29:02  mario
  23.   Doppelter Prototyp gelöscht
  24.  
  25.   Revision 1.2  2001/05/20 13:12:02  mario
  26.   CVS-Idents und Logs eingefügt
  27.  
  28.  
  29. */
  30.  
  31. #ifndef _DOS_H
  32. typedef unsigned char    byte;
  33. #endif
  34. typedef unsigned short    word;
  35. typedef signed short    Integer;
  36.  
  37. #define NUMBER(a) (sizeof(a)/sizeof(a[0]))
  38.  
  39. word Pop(void);
  40. void Push(word Value);
  41. void XeqError(word err);
  42.  
  43. void ProcessNative(word JTab);
  44.  
  45. void IoError    (word Result);
  46. void UnitRead    (word Unit, word Addr, Integer AddrOffset,
  47.          word Len, word Block, word Mode);
  48. void UnitWrite    (word Unit, word Addr, Integer AddrOffset,
  49.          word Len, word Block, word Mode);
  50. void UnitClear    (word Unit);
  51. void UnitStat    (word Unit, word Addr, Integer AddrOffset, word Dummy);
  52. word UnitBusy    (word Unit);
  53. void UnitWait    (word Unit);
  54.  
  55. void panic(char *Msg, ...);
  56. void warning(char *Msg, ...);
  57. void XeqError(word err);
  58.  
  59. void CspIdSearch(word BufPtr, word Arg2Ptr);
  60. word CspTreeSearch(word TokenBuf, word ResultPtr, word NodePtr);
  61.  
  62. extern word Syscom;
  63.  
  64. #define SYSCOM_SIZE    170
  65. #define IORSLT        WordIndexed(Syscom,0)
  66. #define XEQERR        WordIndexed(Syscom,1)
  67. #define SYSUNIT        WordIndexed(Syscom,2)
  68. #define BUGSTATE    WordIndexed(Syscom,3)
  69. #define GDIRP        WordIndexed(Syscom,4)
  70. #define BOMBP        WordIndexed(Syscom,5)
  71. #define STKBASE        WordIndexed(Syscom,6)
  72. #define LASTMP        WordIndexed(Syscom,7)
  73. #ifdef APPLE_1_3
  74. #define BOMBPROC    WordIndexed(Syscom,8)
  75. #define BOMBSEG        WordIndexed(Syscom,9)
  76. #else
  77. #define JTAB        WordIndexed(Syscom,8)
  78. #define SEG        WordIndexed(Syscom,9)
  79. #endif
  80. #define MEMTOP        WordIndexed(Syscom,10)
  81. #define BOMBIPC        WordIndexed(Syscom,11)
  82.  
  83. #ifdef UCSD_I_3
  84. #define EXTENSION0    WordIndexed(Syscom,12)
  85. #define EXTENSION1    WordIndexed(Syscom,13)
  86. #define EXTENSION2    WordIndexed(Syscom,14)
  87. #define EXTENSION3    WordIndexed(Syscom,15)
  88. #define EXTENSION4    WordIndexed(Syscom,16)
  89. #define EXTENSION5    WordIndexed(Syscom,17)
  90. #define EXTENSION6    WordIndexed(Syscom,18)
  91. #define EXTENSION7    WordIndexed(Syscom,19)
  92. #define EXTENSION8    WordIndexed(Syscom,20)
  93. #define EXTENSION9    WordIndexed(Syscom,21)
  94. #define EXTENSION10    WordIndexed(Syscom,22)
  95. #define EXTENSION11    WordIndexed(Syscom,23)
  96. #define EXTENSION12    WordIndexed(Syscom,24)
  97. #define EXTENSION13    WordIndexed(Syscom,25)
  98. #define EXTENSION14    WordIndexed(Syscom,26)
  99. #else
  100. #define HLTLINE        WordIndexed(Syscom,12)
  101. #define BRKPTS0        WordIndexed(Syscom,13)
  102. #define BRKPTS1        WordIndexed(Syscom,14)
  103. #define BRKPTS2        WordIndexed(Syscom,15)
  104. #define BRKPTS3        WordIndexed(Syscom,16)
  105. #define RETRIES        WordIndexed(Syscom,17)
  106. #define EXTENSION0    WordIndexed(Syscom,18)
  107. #define EXTENSION1    WordIndexed(Syscom,19)
  108. #define EXTENSION2    WordIndexed(Syscom,20)
  109. #define EXTENSION3    WordIndexed(Syscom,21)
  110. #define EXTENSION4    WordIndexed(Syscom,22)
  111. #define EXTENSION5    WordIndexed(Syscom,23)
  112. #define EXTENSION6    WordIndexed(Syscom,24)
  113. #define EXTENSION7    WordIndexed(Syscom,25)
  114. #define EXTENSION8    WordIndexed(Syscom,26)
  115. #endif
  116. #define LOWTIME        WordIndexed(Syscom,27)
  117. #define HIGHTIME    WordIndexed(Syscom,28)
  118. #define MISCINFO    WordIndexed(Syscom,29)
  119. #define CRTTYPE        WordIndexed(Syscom,30)
  120. #define XRTCTRL        WordIndexed(Syscom,31)
  121. #define CRTINFO        WordIndexed(Syscom,37)
  122.  
  123. #define SEG_ENTRY_LEN    3
  124. #define SEG_UNIT(s)    WordIndexed(Syscom, 48 + SEG_ENTRY_LEN*(s))
  125. #define SEG_BLOCK(s)    WordIndexed(SEG_UNIT(s),1)
  126. #define SEG_SIZE(s)    WordIndexed(SEG_UNIT(s),2)
  127.  
  128. #ifdef __SASC
  129. #define vsnprintf(s,size,format,ap) vsprintf(s,format,ap)
  130. #endif
  131.